package com.donn.securitycontrolplatform.expection;

import com.donn.securitycontrolplatform.emum.RESULT_CODE;
import lombok.Data;

/**
 * 
 * @description 自定义异常信息
 * @author xianzw
 * @time 2019年2月27日下午4:20:06
 */
@Data
public class BusinessException extends Exception{

	private static final long serialVersionUID = 1L;

	private Integer exceptionCode;//异常码
	
	private String exceptionMessage;//异常信息

	private RESULT_CODE resultCode;//异常信息详情



	public BusinessException(RESULT_CODE resultCode) {
		super();
		this.resultCode = resultCode;
	}

	public BusinessException(Integer exceptionCode) {
		super();
		this.exceptionCode = exceptionCode;
	}



	
	public BusinessException(Integer exceptionCode,String exceptionMessage){
		super();
		this.exceptionCode = exceptionCode;
		this.exceptionMessage = exceptionMessage;
	}
	
	//根据异常码获取异常信息
//	@Override
//	public String getMessage() {
//    	return PropertyUtil.getPropertiesValue(exceptionCode);
//	}
	
}
